import { NavParams } from 'ionic-angular';
import {Component, ViewChild} from '@angular/core';
import {ImagePipe} from '../../pipes/pipes';
import {Platform} from 'ionic-angular';
@Component({

  templateUrl: 'build/pages/tab-events/tab-popover.html',
  pipes: [ImagePipe],
})
export class PopoverPage {
   static get parameters() {
    return [ [NavParams],[Platform]];
  }
  constructor( params,platform) {
   this.platform=platform;
     this.video = params.get('videos');
      if (this.platform.is('android')) {
      this.isAndroid = true;
    }
     this.video.play=false;
     console.log(this.video,'8989');
  }

  playVideo(video){
     console.log(video,'5656');
    var videoEle = document.querySelector('#'+video.id.replace('gtig$',''));
    if (!video.play) {
      videoEle.play();
      video.play = true;
    } else {
      videoEle.pause();
      video.play = false;
    }

  }
}